<?php

namespace Home\Controller;

use Think\Controller;
use Home\Model\GameModel;

class IndexController extends Controller {

    /**
     * 游戏对象模型
     * @var type
     */
    private $gameModel;

    public function __construct() {
        parent::__construct();
        $this->gameModel = new GameModel();
    }

    public function index() {
        $serverlist = $this->gameModel->serverList(0, 0, array('0', '8'));
        $newlist = $this->gameModel->gameAll(1); //参数1为新游戏推荐
        $gamelist = $this->gameModel->gameAll(0, 0, array('0', '12'));
        $this->assign('gamelist', $gamelist);
        $this->assign('newlist', $newlist);
        $this->assign('serverlist', $serverlist);
        $this->assign('indexCss', 'on');
        $this->display();
    }

}
